Downloading packages from git requires zstd to compress their tarballs.
Make sure that zstd from host tools is compiled when running make
download. Otherwise, either the download would fail because zstd is not
present or a random version from the host would be used leading to hash
mismatches.
Signed-off-by: Andreas Gnau <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/21125
Signed-off-by: Christian Marangi <[email protected]>
DOWNLOAD_DIRS = package/download
endif
-download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile)
+download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile) $(if $(wildcard $(STAGING_DIR_HOST)/bin/zstd),,tools/zstd/compile)
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
clean dirclean: .config